package com.jinbei.common.contants;

import java.util.UUID;

/**
 * @author zflu
 * static params
 * Created by lucky on 2018/7/9.
 */
public class Contants {

    /**
     * 验证码 code
     */
    public static char CODE[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789".toCharArray();

    /**
     * 返回 session imageCode
     */
    public static String IMAGE_CODE = "imageCode";

    /**
     * 图片 jpg
     */
    public static String IMAGE_JPG = "jpg";

    /**
     * 初始化用户状态
     */
    public static String INIT_ROLE = "0";

    /**
     * 锁定用户状态
     */
    public static String LOCK_USER = "1";

    /**
     * 用户 loginName
     */
    public static String LOGIN_NAME = "loginName";

    /**
     * 用户 password
     */
    public static String PASSWORD = "password";

    /**
     * 授权保存时间 单位为 s
     */
    public static long AUTHOR_USER_TIME = 60*60*12*1000;


    /**
     * cookie errorUser 保存时间 单位为 s
     */
    public static int COOKIE_USER_TIME = 60*60*24;

    /**
     * 拦截器 存入request 的 logs
     */
    public static String LOGS = "logs";

    /**
     * 拦截器 存入request 的 flag
     */
    public static String FLAG = "flag";

    /**
     * 密码错误 次数
     */
    public static String LOGIN_ERROR_USER= "errorUser";

    /**
     *  授权
     */
    public static String AUTHORIZATION = "Authorization";

    /**
     * 授权加盐
     */
    public static String DECODER_KEY = "012FQAW321";

    /**
     * 零
     */
    public static String ZERO = "0";

    /**
     * 系统名称
     */
    public static String SYSTEM_NAME = "/UnifiedBgManage";

    /**
     * 图片cookie time
     */
    public static long IMAGE_TIME = 60*6;

    /**
     * true
     */
    public static Integer BOOLEAN_TRUE = 1;

    /**
     * false
     */
    public static Integer BOOLEAN_FALSE = 0;

    /**
     * TOKEN
     */
    public static String TOKEN = UUID.randomUUID().toString() + System.currentTimeMillis();

    /**
     * redis hash key
     */
    public static String COURSE_KEY = "course";

    /**
     * user type
     */
    public static String TYPE_USER = "user";

    /**
     * dept type
     */
    public static String TYPE_DEPT = "dept";

    /**
     * 加密字符类型
     */
    public static String CHARSET_NAME = "UTF-8";

    /**
     *  秘钥参数 name
     */
    public static String ENCRYPT_KEY_NAME = "encrypt";

    /**
     * 测试返回成功code
     */
    public static String TEST_RESULT_CODE = "{\"code\":200,\"msg\":\"success\",\"data\":null}";
}
